//
//  BKZSHistoryTableViewCell.m
//  baokaodaxue
//
//  Created by liuting on 15/6/14.
//  Copyright (c) 2015年 宏图教育. All rights reserved.
//

#import "BKZSHistoryTableViewCell.h"

@implementation BKZSHistoryTableViewCell

- (void)awakeFromNib {
    // Initialization code
    
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = [UIColor clearColor];
    self.selectedBackgroundView = view;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

- (void)drawRect:(CGRect)rect{
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    CGContextSetLineWidth(context, .8);
    
    CGContextSetRGBStrokeColor(context, .5, .5, .5, .6);
    
    CGContextMoveToPoint(context, 0, 0);
    CGContextAddLineToPoint(context,rect.size.width, 0);
    CGContextAddLineToPoint(context,rect.size.width, rect.size.height);
    CGContextAddLineToPoint(context, 0, rect.size.height);
    CGContextAddLineToPoint(context, 0, 0);
    CGContextStrokePath(context);
    
    CGContextSetLineWidth(context, .5);
    CGContextSetRGBStrokeColor(context, .5, .5, .5, 0.5);
    
    CGFloat first = 57;
    CGFloat height = rect.size.height;
    CGFloat width = rect.size.width;
    CGContextMoveToPoint(context, first, 0);
    CGContextAddLineToPoint(context, first, height);
    CGContextStrokePath(context);
    
    CGContextMoveToPoint(context, first + 2 + 57, 0);
    CGContextAddLineToPoint(context, first + 2 + 57, height);
    CGContextStrokePath(context);
    
    CGFloat itemWidth = ( rect.size.width - first - 59 ) / 3;
    for (int i = 1; i < 3; i ++) {
        CGContextMoveToPoint(context, first + 59 + itemWidth * i, 0);
        CGContextAddLineToPoint(context, first + 59 + itemWidth * i, height);
        CGContextStrokePath(context);
    }
    
    CGContextMoveToPoint(context, first , height / 2);
    CGContextAddLineToPoint(context, width, height / 2);
    CGContextStrokePath(context);
    
}


@end
